#!/usr/bin/env python
#
# vmnetx - Virtual machine network execution
#
# Copyright (C) 2012 Carnegie Mellon University
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as published
# by the Free Software Foundation.  A copy of the GNU General Public License
# should have been distributed along with this program in the file
# COPYING.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#

from optparse import OptionParser
import sys

import vmnetx
from vmnetx.ui import VMNetXUI

USAGE = 'Usage: %prog [options] {reference-path|package-url|package-path}'
VERSION = '%prog ' + vmnetx.__version__
DESCRIPTION = 'Execute a VMNetX virtual machine.'

parser = OptionParser(usage=USAGE, version=VERSION, description=DESCRIPTION)
opts, args = parser.parse_args()
if len(args) != 1:
    parser.error('Incorrect mandatory argument')
package_ref = args[0]

app = VMNetXUI(package_ref)
app.run()
